#include <iostream>
#include <vector>

using namespace std;

int main(void)
{
    vector<int> v(5, 100);

    cout << "Initial vector contents" << endl;
    for (int i = 0; i < v.size(); ++i)
        cout << v[i] << endl;

    cout << endl;

    cout << "Modified vector contents" << endl;

    vector<int> t;
    t.assign(v.begin(), v.begin() + 2);
    for (int i = 0; i < v.size(); ++i)
        cout << v[i] << endl;

    return 0;
}